#include<iostream>
using namespace std;
int main()
{
    cout<<"limit=?"<<endl;
    float n=1,limit,sum=0;
    cin>>limit;
    while(sum<=limit)
    {
        sum+=(1/n);
        n++;
    }
    cout<<"n="<<n-1<<",sum="<<sum<<endl;
    return 0;
}